package ask

//================================user=========================================start

type RegRequest struct {
	Link     string `json:"link"` //link：字段复用,可以为手机号或者邮箱
	Nickname string `json:"nickname"`
	Password string `json:"password"`
	Sms      string `json:"sms"`
}

type SendSmsRequest struct {
	Link string `json:"link"` //link：字段复用,可以为手机号或者邮箱
}

type LoginRequest struct {
	LoginType string `json:"login_type"` //*必填 需要根据他来进行判断 什么登录方式. 0:手机（邮箱）验证码；1：账号密码。
	Username  string `json:"username"`   //账号
	Password  string `json:"password"`   //密码
	Link      string `json:"link"`       //link：字段复用,可以为手机号或者邮箱
	Sms       string `json:"sms"`        //sms：验证码 非必填
}

type UpPwdRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Link     string `json:"link"` //link：字段复用,可以为手机号或者邮箱
	Sms      string `json:"sms"`
}

type AddAddress struct {
	Receiver  string `json:"receiver"`
	Phone     string `json:"phone"`
	Province  string `json:"province"`
	City      string `json:"city"`
	District  string `json:"district"`
	Detail    string `json:"detail"`
	IsDefault string `json:"is_default"`
}

//================================user=========================================end

//================================collect======================================start

type AreaCodeRequest struct {
	Address string `json:"address" binding:"required"`
}

// 行参
type CityDBRequest struct {
	WorkType string `json:"workType" binding:"required"`
	WorkCity string `json:"workCity" binding:"required"`
	IsDB     string `json:"useMysqlRedis"`
}

// 行参
type SetScoreReq struct {
	WorkType      string `json:"workType" binding:"required"`
	WorkCity      string `json:"workCity" binding:"required"`
	UseMysqlRedis string `json:"useMysqlRedis"`
	Score         string `json:"score"`
}

type BrandReq struct {
	BrandName string `json:"job_name" binding:"required"`
}

type TaskReq struct {
	TaskName string `json:"task_name" binding:"required"`
	TaskKey  string `json:"task_key" binding:"required"`
}

//================================collect=========================================end

type ProductItem struct {
	ProductsID int `json:"products_id"`
	Stock      int `json:"stock"`
}

type OrderReq struct {
	Products        []ProductItem `json:"product_item"  binding:"required"`
	PayMethod       string        `json:"pay_method" binding:"required"`
	TotalAmount     float64       `json:"total_amount" binding:"required"`     //订单总金额
	PaymentAmount   float64       `json:"payment_amount" binding:"required"`   //实付金额
	FreightAmount   float64       `json:"freight_amount" binding:"required"`   //运费
	DiscountAmount  float64       `json:"discount_amount" binding:"required"`  //优惠金额
	CouponID        string        `json:"coupon_id" binding:"required"`        //优惠金额
	ShippingAddress string        `json:"shipping_address" binding:"required"` //收货地址
	Note            string        `json:"note"`                                //备注
}
